/*
 * @Author: your name
 * @Date: 2020-08-17 09:50:04
 * @LastEditTime: 2020-09-01 23:55:57
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \react-hkzf-mobile\src\App.js
 */
import React from 'react';
// 按需引入


// 导入漏油
import { BrowserRouter as Router, Route, Redirect } from "react-router-dom";

// 导入组件
import Home from './pages/Home';
import CityList from './pages/CityList';
import Map from './pages/Map';
import HouseDetail from './pages/HouseDetail';
import Login from './pages/Login';



function App() {
  return (
    <Router>
      <div className="App">
        {/* 默认漏油---"/"===>"/home" */}
        <Route exact path='/' render={() => (<Redirect to="/home" />)} ></Route>

        {/* 配置漏油 */}
        <Route path='/home' component={Home}></Route>
        <Route path='/citylist' component={CityList}></Route>
        <Route path='/map' component={Map}></Route>

        {/* 匹配房源详情---需要传递房源id */}
        <Route path='/detail/:id' component={HouseDetail}></Route>
        <Route path="/login" component={Login} />
        {/* <Route path="/registe" component={Registe} /> */}
      </div>
    </Router>

  );
}

export default App;
